package edu.nf.bs.util;

import java.util.Date;
import java.util.UUID;

/**
 * @author Miss f
 * @data 2021-06-17-9:47
 */
public class UUIDUtil {
    /**
     * 随机生成数字
     * @return
     */
    public static long randomNum(){
        return Long.parseLong((String.valueOf(UUID.randomUUID().hashCode())));
    }

    /**
     * 数字字母混搭
     * @return
     */
    public static String randomStr(){
        return UUID.randomUUID().toString().replaceAll("-","").toUpperCase();
    }

    public static void main(String[] args){
        //System.out.println(UUID.randomUUID().toString())
        System.out.println(UUIDUtil.randomNum());
    }

}
